package com.collabscm.pf.dao.support;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;

import com.collabscm.pf.dao.support.DomainDaoFactory.EntityManagerProvider;

/**
 * 默认的EntityManagerProvider实现类
 *
 * @author Zeng Raoxing
 */
@Component
public class DefaultEntityManagerProvider extends EntityManagerProvider {
	
	protected EntityManager entityManager;
	
	@PersistenceContext
	public void setEntityManager(EntityManager entityManager) {
		this.entityManager = entityManager;
	}
	
	@Override
	protected EntityManager getEntityManager() {
		return entityManager;
	}

}
